package et.six.eta.View.Sideslip;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import et.six.eta.Adapter.RvLxrAdapter;
import et.six.eta.R;
import et.six.eta.Util.app.BaseFragment;

public class developer extends BaseFragment {

    private ViewPager vp;
    private  BaseFragment[] frags;
    private TabLayout tl;
    private  String[] tabTexts;




    @Override
    protected View initView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container) {
        View view=inflater.inflate(R.layout.developer_team,container,false);
        vp=view.findViewById(R.id.vp);
        tl=view.findViewById(R.id.tl);
        return view;

    }

    @Override
    protected void initData() {
        tabTexts=new String[]{"阳阳","明明","一一","琦琦","旭旭","洋洋","康康"};
        frags=new BaseFragment[]{
                new developer_zhangchangyang(),new developer_limingming(),
                new developer_sunyi(), new developer_dingqi(),new developer_lixu(),new developer_chenyang(), new developer_zhucenkang()
        };
        RvLxrAdapter adapter = new RvLxrAdapter(getChildFragmentManager(), frags,tabTexts);
        vp.setAdapter(adapter);
        vp.setOffscreenPageLimit(frags.length-1);
        tl.setupWithViewPager(vp,true);
    }

    @Override
    protected void initListener() {

    }
}
